#!/bin/bash
# Usage: ./block-decrypt.sh (d|e) infile outfile count
for ((i = 0; i < $4 ;i++))
do
    dd if=$2.txt bs=2048 count=1 skip=$i | openssl enc -aes-128-cbc -$1 -out $3.$i.txt -K 1a1dc91c907325c69271ddf0c944bc72 -iv 0 -nosalt -nopad
done